<{include file="db:`$dirname`_header.html"}>

<div id="mileage_attendance">

<h3><{$title}></h3>


<div style="text-align:center;">
  <div id="calNavi">
	  <div class="yearMonth">
	  <{$year}> <{$smarty.const._MD_MILEAGE_LANG_YEAR}> <{$month}> <{$smarty.const._MD_MILEAGE_LANG_MONTH}>
	  </div>
	  <div class="prev">
	    <a href="<{$dirname|mileage_make_uri:LoginCal:mile_id:$targetMileId:ym:$prevMonth}>" class="link"><{$smarty.const._MD_MILEAGE_LANG_PREV_MONTH}></a>
	  </div>
	  <{if $nextMonth}>
	    <div class="next">
	      <a href="<{$dirname|mileage_make_uri:LoginCal:mile_id:$targetMileId:ym:$nextMonth}>" class="link"><{$smarty.const._MD_MILEAGE_LANG_NEXT_MONTH}></a>
	    </div>
	  <{/if}>
	  <br style="clear:both;font-size:0;" />
  </div>
</div>



<table border="1">
<tr><th><{$smarty.const._MD_MILEAGE_WEEK_START_SUN}></th><th><{$smarty.const._MD_MILEAGE_WEEK_START_MON}></th><th><{$smarty.const._MD_MILEAGE_WEEK_START_TUE}></th><th><{$smarty.const._MD_MILEAGE_WEEK_START_WED}></th><th><{$smarty.const._MD_MILEAGE_WEEK_START_THU}></th><th><{$smarty.const._MD_MILEAGE_WEEK_START_FRI}></th><th><{$smarty.const._MD_MILEAGE_WEEK_START_SAT}></th></tr>
<{strip}>
<{assign var='counter' value=$wday*-1+1}>
<{section name=cnt start=0 loop=$weekNum*7}>
	<{if $smarty.section.cnt.index%7 == 0}><tr class="odd"><{/if}>
	<td <{if $smarty.section.cnt.index%7==0}>class="sunday"<{elseif $smarty.section.cnt.index%7==6}>class="saturday"<{/if}>>
	<{if $smarty.section.cnt.index >= $wday && $smarty.section.cnt.index-$wday+1 <= $lastday}>
		<{$smarty.section.cnt.index-$wday+1}>
	<{/if}>
	</td>
	<{if $smarty.section.cnt.index%7 == 6}>
		</tr>
		<{assign var='counter' value=$counter}>
		<{section name=con_cnt start=0 loop=7}>
			<{if $smarty.section.con_cnt.index%7 == 0}><tr class="shuketsu"><{/if}>
			<td <{if $objects[$counter]}>class="shuseki"<{/if}>>
				<{if $objects[$counter]}>
					<{$smarty.const._MD_MILEAGE_LANG_ATTENDANCE_OK}>
				<{else}>
					&nbsp;
				<{/if}>
			</td>
			<{if $smarty.section.con_cnt.index%7 == 6}></tr><{/if}>
			<{assign var='counter' value=$counter+1}>
		<{/section}>
	<{/if}>
<{/section}>
<{/strip}>
</table>

</div><{* <!--end of #mileage_attendance--> *}>

<{include file="db:`$dirname`_footer.html"}>
